#include <iostream>
#include <string>
using namespace std;

class Person {
protected:
  string name, telephone, address;

public:
  Person(const string &name, const string &telephone, const string &address)
      : name(name), telephone(telephone), address(address){};
};

class Student : virtual public Person {
protected:
  string major;

public:
  Student(const string &name, const string &telephone, const string &address,
          const string major)
      : Person(name, telephone, address), major(major) {}

  void show() {
    cout << "学生姓名：" << name << endl;
    cout << "学生地址：" << address << endl;
    cout << "学生电话：" << telephone << endl;
    cout << "学生专业：" << major << endl;
  }
};

class Staff : virtual public Person {
protected:
  string office;
  int pay;

public:
  Staff(const string &name, const string &telephone, const string &address,
        const string &office, int pay)
      : Person(name, telephone, address), office(office), pay(pay) {}

  void show() {
    cout << "在职教师姓名：" << name << endl;
    cout << "在职教师地址：" << address << endl;
    cout << "在职教师电话：" << telephone << endl;
    cout << "所在部门：" << office << endl;
    cout << "工资：" << pay << endl;
  }
};

class Teacher : public Staff {
protected:
  string information;

public:
  Teacher(const string &name, const string &telephone, const string &address,
          const string &office, int pay, const string &information)
      : Person(name, telephone, address),
        Staff(name, telephone, address, office, pay), information(information) {
  }

  void show() {
    cout << "教师姓名：" << name << endl;
    cout << "教师地址：" << address << endl;
    cout << "教师电话：" << telephone << endl;
    cout << "教师所在部门：" << office << endl;
    cout << "教师工资：" << pay << endl;
    cout << "教师授课信息：" << information << endl;
  }
};

class StudentTeacher : public Teacher, public Student {
public:
  StudentTeacher(const string &name, const string &telephone,
                 const string &address, const string &major,
                 const string &office, int pay, const string &infomation)
      : Person(name, telephone, address),
        Student(name, telephone, address, major),
        Teacher(name, telephone, address, office, pay, infomation) {}

  void show() {
    cout << "在职进修教师姓名：" << name << endl;
    cout << "在职进修教师地址：" << address << endl;
    cout << "在职进修教师电话：" << telephone << endl;
    cout << "在职进修教师专业：" << major << endl;
    cout << "在职进修教师所在部门：" << office << endl;
    cout << "在职进修教师工资：" << pay << endl;
    cout << "在职进修教师授课信息：" << information << endl;
  }
};

int main() {
  Student student("syy", "123", "china", "hkpu");
  student.show();

  Staff staff("syy", "123", "china", "police", 5000);
  staff.show();

  Teacher teacher("syy", "123", "china", "english", 5000, "do");
  teacher.show();

  StudentTeacher studentTeacher("syy", "123", "china", "english", "english",
                                5000, "dot");
  studentTeacher.show();

  return 0;
}